package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacPermDao;
import com.woniuxy.entity.RbacPerm;
import com.woniuxy.service.RbacPermService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author: wgt
 * Date: 2021/11/14:21:04
 * Description:
 */
public class RbacPermImpl implements RbacPermService {

    ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
    RbacPermDao rbacPermDao=applicationContext.getBean("rbacPermDao",RbacPermDao.class);
    @Override
    public List<RbacPermService> findAll(int id) {
        return rbacPermDao.findAll(id);
    }

    @Override
    public int save(RbacPermService rbacPerm) {
        return rbacPermDao.save(rbacPerm);
    }

    @Override
    public int deleteById(RbacPermService id) {
        return rbacPermDao.deleteById(id);
    }

    @Override
    public int update(RbacPermService rbacPerm) {
        return rbacPermDao.update(rbacPerm);
    }
}
